/*
 * Copyright 2008-2012 Centro Andaluz de Innovación y Tecnologías de la
 * Información y las Comunicaciones (CITIC). All Rights Reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
 *
 * Please contact CITIC - Edificio CITIC, C/ Marie Curie, 6 Parque
 * Tecnológico de Andalucía 29590 - Campanillas, Málaga, Spain
 * or visit www.citic.es, if you need additional information or
 * have any questions.
 */

package es.citic.puedes.youtube.model;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

/**
 * class that represents the YouTube comments
 * 
 * 
 */
public class YouTubeComment {

	/**
	 * comment authors
	 */
	private List<String> authors;
	/**
	 * comment text
	 */
	private String text;
	/**
	 * comment published date
	 */
	private Calendar published;

	/**
	 * empty constructor
	 */
	public YouTubeComment() {

		authors = new ArrayList<String>();
		text = null;
		published = null;
	}

	/**
	 * constructor with parameters
	 * 
	 * @param authors
	 *            comment authors
	 * @param text
	 *            comment text
	 * @param published
	 *            comment published date
	 */
	public YouTubeComment(List<String> authors, String text, Calendar published) {
		this.authors = authors;
		this.text = text;
		this.published = published;
	}

	/**
	 * @return the authors
	 */
	public List<String> getAuthors() {
		return authors;
	}

	/**
	 * @param authors
	 *            the authors to set
	 */
	public void setAuthors(List<String> authors) {
		this.authors = authors;
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * @param text
	 *            the text to set
	 */
	public void setText(String text) {
		this.text = text;
	}

	/**
	 * @return the published date
	 */
	public Calendar getPublished() {
		return published;
	}

	/**
	 * @param published
	 *            the published date to set
	 */
	public void setPublished(Calendar published) {
		this.published = published;
	}

	@Override
	public String toString() {

		String result = null;

		result = "comment text: " + getText() + "\n";

		result = result + ", comment authors: " + getAuthors() + "\n";

		result = result + ", comment was published: "
				+ getPublished().getTime().toString() + "\n\n";

		return result;

	}

}
